import {action, observable} from "mobx";
import {BaseResInterface, sendGetRequest, sendPostRequest} from "../../../net";
import UserStoreInstance from "../user";


interface Evaluation {

}

interface EvaluateForm {
    star: number,
    comment: string
}

export class EvaluationStore {

    @action.bound
    async evaluateOrder(form:EvaluateForm,orderId:number) {
        await sendPostRequest("order/evaluateOrder",{
            ...form,orderId,userId:UserStoreInstance.user.id
        })
    }

}

const EvaluationStoreInstance = new EvaluationStore();
export default EvaluationStoreInstance